<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      #box {
        display: flex;
        width: 400px;
        height: 400px;

        margin: 100px 0 0 200px;
        display: flex;
        justify-content: center;
        align-items: center;
        border: solid;
        font-size: 40px;
      }
      #box div {
        width: 100px;
        height: 100px;
        background-color: beige;
        display: flex;
        align-items: center;
        justify-content: center;
        border: solid;
      }
    </style>
  </head>
  <body>
    <div id="box">
      1
      <div>2</div>
    </div>

    <script>
      const box = document.getElementById("box");
      box.addEventListener("mouseover", () => console.log("mouseover"));
      box.addEventListener("mouseout", () => console.log("mouseout"));
    </script>
  </body>
</html>
